<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets">
<ui:composition template="template.xhtml">
    <ui:define name="content">
        <div class="container">
            <h:form id="resultForm">
                <div style="text-align: center">
                    <table cellpadding="5" style="margin: 0 auto; text-align: left; font-style: italic; font-size: 25px;">
                        <ui:repeat value="#{resultsBean.matches}" var="match">
                            <tr>
                                <td style="color: lightgrey"><h:outputText value="#{match.date}">
                                    <f:convertDateTime pattern="yyyy-MM-dd" timeZone="CET" />
                                </h:outputText></td>
                                <td><h:outputText value="#{match.player1.fullName()}" style="#{match.homeVictory() ? 'color:gold; text-shadow: 1px 1px 1px #000000;' : ''}"/></td>
                                <td><h:outputText style="color: lightgrey" value="vs"/></td>
                                <td><h:outputText value="#{match.player2.fullName()}" style="#{match.awayVictory() ? 'color:gold; text-shadow: 1px 1px 1px #000000;' : ''}"/></td>
                                <td><h:outputText value="#{match.setsAsString()}"/></td>
                            </tr>
                        </ui:repeat>
                    </table>
                </div>
            </h:form>
        </div>
    </ui:define>
</ui:composition>
</html>
